package xcmg.device.dao.mapper.basic;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import xcmg.device.dao.entity.basic.ModelMaterialRelationDO;
import xcmg.device.service.vo.basic.MaterialsMaintenSearchVO;
import xcmg.device.service.vo.basic.MaterialsVO;
import xcmg.device.service.vo.basic.ModelMaterialRelationVO;

import java.util.List;

@Mapper
@Repository
public interface ModelMaterialRelationMapper {
    int deleteByPrimaryKey(String id);

    int insertSelective(ModelMaterialRelationDO record);

    ModelMaterialRelationDO selectByPrimaryKey(String id);

    List<ModelMaterialRelationDO> selectByMaintenanceModelId(@Param("maintenanceModelId") String maintenanceModelId);

    int updateByPrimaryKeySelective(ModelMaterialRelationDO record);

    int deleteByCommonMaintenanceId(@Param("maintenanceModelId") String maintenanceModelId);

    int countByMaintenanceModelIdAndMate(@Param("maintenanceModelId") String maintenanceModelId,@Param("materialsNo") String materialsNo);

    List<ModelMaterialRelationDO> list(ModelMaterialRelationVO vo);

    List<ModelMaterialRelationDO> unrelatedMaterialList(ModelMaterialRelationVO vo);

    List<MaterialsVO>  queryMateList(MaterialsMaintenSearchVO searchVO );
}